/**
Company: Sarkar software technologys
WebSite: http://www.sarkar.cn
Author: yeganaaa
Date : 5/16/18
Time: 6:10 PM
 */

package Cn.Sarkar.IMS.Entities

import Cn.Sarkar.Entities.Common.BaseEntity
import Cn.Sarkar.Entities.IMS.IIMSApplicationDomain
import Cn.Sarkar.Entities.IMS.IStorageRoom
import Cn.Sarkar.Entities.IMS.IStorageRoomItem
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.hasOne
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.IDataContext
import Cn.Sarkar.IMS.DataBaseDefinations.StorageRoomItems

class StorageRoomItem(DataContext: IDataContext) : IStorageRoomItem, BaseEntity(DataContext, StorageRoomItems) {
    var applicationDomainID by StorageRoomItems.ApplicationDomainID
    override var applicationDomain: IIMSApplicationDomain by hasOne(StorageRoomItems.ApplicationDomainID) { IMSApplicationDomain(it) }
    var storageRoomID by StorageRoomItems.StorageRoomID
    override var storageRoom: IStorageRoom by hasOne(StorageRoomItems.StorageRoomID) { StorageRoom(it) }
    override var count: Float by StorageRoomItems.Count
}